package com.qd.panda.advertisement;

import com.qd.common.panda.domain.entity.advertisement.AdvertisementDTO;
import com.qd.panda.service.advertisement.AdvertisementService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 广告信息/APP_广告信息
 *
 * @author sjk
 */
@RequiredArgsConstructor
@Validated
@RestController
@RequestMapping("/app/advertisement/")
@Slf4j
public class AppAdvertisementController {
    private final AdvertisementService advertisementService;

    /**
     * 全部
     *
     * @param dto 查询参数以及页数和每页显示条数
     * @return 列表信息
     */
    @GetMapping(value = "/list")
    public List<AdvertisementDTO> list(AdvertisementDTO dto) {
        return advertisementService.getListDto(dto);
    }
}